/*
 * GSqliteConnectionManager.cpp
 *
 *  Created on: 2010-12-23
 *      Author: minhua
 */

#include "GSqliteConnectionManager.h"
#include "../GConfig.h"

GSqliteConnectionManager *GSqliteConnectionManager::_instance = new GSqliteConnectionManager();

GSqliteConnectionManager::GSqliteConnectionManager()
{
	_connectionPool = new GSqliteConnectionPool(GConfig::instance()->localDatabaseFilename(),
												GConfig::instance()->maxLocalDatabaseConnectionCount());
}

GSqliteConnectionManager::~GSqliteConnectionManager()
{
	delete _connectionPool;
}

GSqliteConnectionManager *GSqliteConnectionManager::instance()
{
	return _instance;
}

GSqliteConnectionPool *GSqliteConnectionManager::connectionPool()
{
	return _connectionPool;
}

